{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "def __init__ (self)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2\n"
     ]
    }
   ],
   "source": [
    "print(1+1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "11\n"
     ]
    }
   ],
   "source": [
    "print(\"1\"+\"1\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "class Employee_Management:\n",
    "    raise_pct = 1.05\n",
    "    \n",
    "    def __init__ (self,first,last,pay):\n",
    "        self.first= first\n",
    "        self.last =last\n",
    "        self.pay = pay\n",
    "    def fullname(self):\n",
    "        return \"{}{}\".format(self.first,self.last)\n",
    "    \n",
    "    def apply_raise(self):\n",
    "        self.pay = int(self.pay * self.raise_pct)\n",
    "        \n",
    "    def __repr__(self):\n",
    "        return \"Employee_Management('{}','{}',{})\".format(self.first,self.last,self.pay)\n",
    "\n",
    "    def __str__(self):\n",
    "        return \"{}-{}\".format(self.fullname(),self.pay)\n",
    "\n",
    "        \n",
    "employee_1 = Employee_Management(\"William\",\"LXOD\",1000000)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<__main__.Employee_Management at 0x108cc4da0>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "employee_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<__main__.Employee_Management object at 0x108cc4da0>\n"
     ]
    }
   ],
   "source": [
    "print(employee_1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Employee_Management('William','LXOD',1000000)\n"
     ]
    }
   ],
   "source": [
    "print(employee_1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Employee_Management('William','LXOD',1000000)\n"
     ]
    }
   ],
   "source": [
    "print(employee_1.__repr__())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WilliamLXOD-1000000\n"
     ]
    }
   ],
   "source": [
    "print(employee_1.__str__())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Employee_Management('William','LXOD',1000000)\n"
     ]
    }
   ],
   "source": [
    "print(str(employee_1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Employee_Management('William','LXOD',1000000)\n"
     ]
    }
   ],
   "source": [
    "print(repr(employee_1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime\n",
    "today = datetime.datetime.now()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'2019-11-14 16:32:56.302251'"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "str(today)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'datetime.datetime(2019, 11, 14, 16, 32, 56, 302251)'"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "repr(today)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
